home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / VIRUS / V101PT1 < prev    next >
Text File  |  1989-04-26  |  15KB  |  242 lines

  1. Portal-Rmail-To: garyt@cup.portal.com
  2. Received: by portal.com (3.2/Portal 8)
  3.     id AA13151; Wed, 26 Apr 89 01:38:19 PDT
  4. Received: from Sun.COM (arpa-dev) by sun.Sun.COM (4.0/SMI-4.0)
  5.     id AA18511; Tue, 25 Apr 89 23:07:04 PDT
  6. Received: from sun by Sun.COM (4.1/SMI-4.0)
  7.     id AB12617; Tue, 25 Apr 89 23:06:36 PDT
  8. Message-Id: <8904260606.AB12617@Sun.COM>
  9. Received: from LEHIIBM1.BITNET by IBM1.CC.Lehigh.Edu (IBM VM SMTP R1.2) with BSMTP id 5944; Wed, 26 Apr 89 02:02:41 EDT
  10. Received: by LEHIIBM1 (Mailer R2.03A) id 5718; Wed, 26 Apr 89 02:02:38 EDT
  11. Date:         Wed, 26 Apr 89 02:02:37 EDT
  12. From: Revised List Processor (1.5o) <LISTSERV@IBM1.CC.Lehigh.Edu>
  13. Subject:      File: "V101 1" being sent to you
  14. To: "Gary F. Tom" <sun!portal!cup.portal.com!garyt>
  15.  
  16. Subject: Virus 101 - Chapter 1
  17. From: woodside@ttidca.TTI.COM (George Woodside)
  18. Newsgroups: comp.sys.atari.st,comp.sys.apple,comp.sys.mac,comp.sys.ibm.pc
  19. Date: 1 Mar 89 14:39:58 GMT
  20. Organization: Citicorp/TTI, Santa Monica
  21.  
  22. Preface: The program VKILLER is specific to the ATARI ST. My apologies for
  23. not making this clear in the previous posting, which went to several
  24. newsgroups. I have recieved far too many requests for the program from users
  25. of other systems to reply to each one individually, and the mailer has
  26. bounced some of the replies I tried to send. If you have an Atari, VKILLER
  27. was posted here a few weeks ago, and is available in the archives, on GEnie,
  28. Compuserve, and from most public domain disk distributors and User Group
  29. libraries. The current version is 2.01.
  30.  
  31. Initial postings will cover virus fundamentals, as they apply to the area of
  32. the Atari ST and, similarly, to MS-DOS systems. The file systems of the two
  33. machines are nearly identical. These general information articles will be
  34. cross-posted to the newsgroups in which this topic is now active. Future
  35. postings will be made only to the Atari newsgroup, since they will deal with
  36. viruses (the plural, according to Webster's, is viruses) known to exist in
  37. the ST world.  They would automatically be different than an IBM virus,
  38. since they are in the 68000 instruction set, or from a Mac or Amiga virus,
  39. since the file systems differ. Since all the viruses I have located are the
  40. "BOOT SECTOR" type (far and away the most common), that's what I will dwell
  41. upon. If and when the proposed newsgroup comp.virus becomes active, it will
  42. be added to the list for all postings.
  43.  
  44. Your generic disclaimer: I just an old-school computer hacker, with 20 years
  45. in the software business. I built my first IMSAI many years ago, and have
  46. had several different computers. That qualifies me to have spent a lot of
  47. time on computers, but nothing further. I may be wrong about some things,
  48. may have a different opinion than you or anybody else, or most anything else
  49. you'd care to have disclaimed. What I think is my own opinion, and in no way
  50. represents the opinion or position of my employer or anyone else. I've
  51. written several articles for magazines as well as software related to virus
  52. detection and killing, but I have been known to be wrong (so they tell me
  53. :^)).
  54.  
  55. While posting any kind of information about viruses may trigger someone to
  56. attempt creating one, I believe that the benefit of the knowledge to
  57. potential victims outweighs that risk. I don't believe that you can stop
  58. someone (who wishes to) from creating a virus by withholding information -
  59. it is already available from many sources.  Since not all viruses act the
  60. same, or attempt to attack in the same manner, it may help potential (or
  61. current) victims to learn about the symptoms of the viruses known to exist,
  62. and how to protect themselves.
  63.  
  64. While the concept of viruses can be complex, I'll try to keep things at a
  65. level that should be understandable by most anyone past the casual user
  66. genre. However, since I've been at this sort of thing for some time, what I
  67. consider basic knowledge may not be familiar to everyone. Advance apologies
  68. are offered here for any invalid assumptions, typos, smart alec remarks,
  69. grammatic errors, or whatever offends you.
  70.  
  71. Some basic terms, as they have come to be used in this area:
  72.  
  73. A VIRUS is any program which spreads itself secretly. It may be destructive,
  74. a prank, or even intended to be helpful, but it spreads.
  75.  
  76. A TROJAN HORSE is a program which executes one function secretly while
  77. appearing to be accomplishing some other task, or appearing to be some other
  78. program entirely. One task a Trojan Horse may accomplish is to install a
  79. virus, which would then spread itself.
  80.  
  81. A WORM is a program or function which imbeds itself inside another program,
  82. be it an application, part of a system, a library or whatever. It may or may
  83. not spread itself by some means, and may or may not have destructive
  84. intents.
  85.  
  86. Now, to the basics of a disk (specifically floppies, but true of most hard
  87. disks as well):
  88.  
  89. A DIRECTORY is a list of files and sub-directories. There is one primary
  90. directory (called the root directory) on a disk. It contains the entries for
  91. files, and other directories (called sub-directories, or folders on the
  92. Atari). Sub-directories (folders) may contain entries of other
  93. sub-directories, files, or both. Every file has one entry in the disk
  94. directory (or in some sub-directory). That entry contains, among other
  95. things, the file name, date and time of creation, length, and the address of
  96. the first entry in the File Allocation Table (FAT) for the file.
  97.  
  98. A FAT is a File Allocation Table. It is a road map of how the operating
  99. system will locate data on a disk. Essentially, it is a series of pointers.
  100. The directory entry of a file points to the first FAT entry of that file.
  101. That entry points to the next, and so on, until the last entry, which
  102. contains a special value indicating end of file. There are two copies of the
  103. FAT on the disk, since it is absolutely critical. Lose the FAT, and the data
  104. on the disk becomes un-accessable.
  105.  
  106. A BOOT SECTOR is the first sector on a floppy disk. With the Atari (and
  107. MS-DOS) system, it contains configuration information about the disk. That
  108. information includes how many tracks are on the disk, how many sectors per
  109. track, how many sides on the disk, how big the FATs and directories are,
  110. where the data begins, etc. On the MS-DOS systems, the boot sector contains
  111. the ID of the operating system under which it was formatted. On the Atari,
  112. that value is not used, but replaced (in part) by a number. That number
  113. should be different on every disk, and is used as part of the mechanism by
  114. which disk changes are detected. The boot sector may or may not contain
  115. executable code.  If it does contain executable code, it is normally
  116. executed only at system powerup or system reset time.
  117.  
  118. On all such disks, the boot sector is number 0, the first sector on the
  119. first side of the first track. On a standard format Atari disk, the next
  120. five sectors are the first copy of the FAT, the next five sectors are the
  121. second copy of the FAT, the next seven sectors are the root directory, and
  122. the remainder of the disk is available for data.
  123.  
  124. Now, on with the show:
  125.  
  126. Floppy disks are changed on a regular basis while the computer is being
  127. used. More so on systems with no hard disks, but periodically on most all
  128. systems. This event, referred to as a "Media Change", is detected by the
  129. computer's disk drive. The disk door is opened, the status of the write
  130. protection changes as one disk is removed and another is inserted, etc. When
  131. that happens, the operating system must recognize that the disk has been
  132. changed before attempting to read or write to the new disk. The operating
  133. system reads the disk's boot sector to learn about the newly inserted disk.
  134. That instant, when the operating system checks the new disk, is when nearly
  135. all the boot sector viruses spread. We'll get to that in the next chapter,
  136. but first, a more primary question:
  137.  
  138. How did the virus get in there?
  139.  
  140. When a computer is booted up from a power off state, or reset (in most
  141. cases), it starts executing code from internal ROMs. Those ROMs set up
  142. primary vectors, minimal configuration information, and perform s